package com.seat;

import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.data.redis.core.RedisTemplate;
import org.springframework.data.redis.core.StringRedisTemplate;

@SpringBootTest
public class redis {

    @Autowired
    private StringRedisTemplate stringRedisTemplate;


    @Test
    public void testRedis()
    {

stringRedisTemplate.opsForValue().set("citi","tchi");
String code=stringRedisTemplate.opsForValue().get("citi");
        System.out.println(code);

    }
}
